import { reqGoodsDetailList } from '@/api/goodsdetail'
export default {
  namespaced: true,
  state: {
    goodsList: {}
  },
  mutations: {
    addGoodsDetail(state, goodsList) {
      state.goodsList = goodsList
    }
  },
  actions: {
    async getGoodsDetail(context, id) {
      const res = await reqGoodsDetailList(id)
      // console.log(res)
      context.commit('addGoodsDetail', res.data)
    }
  }
}
